package com.czy.owner.api;

import com.czy.owner.net.api.BaseApi;
import com.czy.owner.net.listener.HttpOnNextListener;
import com.trello.rxlifecycle.components.support.RxAppCompatActivity;

import retrofit2.Retrofit;
import rx.Observable;

/**
 * Created by hep on 2017/1/16 0010.
 */

public class GoodsShareApi extends BaseApi {
    private String session;
    private String goodsId;


    public GoodsShareApi(HttpOnNextListener listener, RxAppCompatActivity rxAppCompatActivity) {
        super(listener, rxAppCompatActivity);
//        setShowProgress(false);
//        setCache(false);
//        setCookieNetWorkTime(0);
        setCache(true);
        setCookieNetWorkTime(0);
        setShowProgress(false);
    }

    public String getSession() {
        return session;
    }

    public void setSession(String session) {
        this.session = session;
    }

    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostService service = retrofit.create(HttpPostService.class);
        return service.getGoodsShare(getSession(),getGoodsId());
    }


}
